package com.rainy.micservice.provider.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;

@RefreshScope
@Configuration
public class BootEnvironment {

    private static Environment env;

    @Autowired
    public void setEnv(Environment env) {
        this.env = env;
    }

    public static String getFrom() {
        return env.getProperty("from");
    }

}
